<?php

namespace application\Module;

use library\Core\Db\CDbCriteria;
use application\Model\ProductTagModel;

class ProductTag
{

    /**
     * @param $pid
     * @param array $select
     * @return array
     * 根据位置获取广告
     */
    public function getList($space_id, $select = ['id', 'name', 'space_id'])
    {
        $criteria = new CDbCriteria();
        $criteria->select($select);
        $criteria->addEqCondition('space_id', $space_id);
        $criteria->addEqCondition('is_del', 0);
        $criteria->addEqCondition('status', 1);
        $criteria->addOrderDesc('orderby');
        $adimageModel = new ProductTagModel();
        return $data = $adimageModel->getListForArray($criteria);

    }

}
